package au.chao.main;

import java.io.Serializable;

public class Tenant extends Person implements Comparable,Serializable {

	private String Email;

	private String Profession;

	private String Workplace;

	private String StartDate;

	private String EndDate;

	private int Rental;

	public Tenant(String fname, String lname) {
		super(fname, lname, "", -1);
		Profession = "Student";
		Workplace = "";
		StartDate = "";
		EndDate = "";
	}

	public Tenant(String fname, String lname, String startD, int rtl) {
		super(fname, lname);
		StartDate = startD;
		EndDate = "";
		Rental = rtl;
	}

	public Tenant(String fname, String lname, String sex, int age,
			String contactNo, String email, String prof, String workloc,
			String startD, String endD) {
		super(fname, lname, sex, age);
		super.setContactNumber(contactNo);
		Email = email;
		Profession = prof;
		Workplace = workloc;
		StartDate = startD;
		EndDate = endD;
	}

	public String getEndDate() {
		return EndDate;
	}

	public void setEndDate(String endDate) {
		EndDate = endDate;
	}

	public String getProfession() {
		return Profession;
	}

	public void setProfession(String profession) {
		Profession = profession;
	}

	public String getStartDate() {
		return StartDate;
	}

	public void setStartDate(String startDate) {
		StartDate = startDate;
	}

	public String getWorkplace() {
		return Workplace;
	}

	public void setWorkplace(String workplace) {
		Workplace = workplace;
	}

	public String getEmail() {
		return Email;
	}

	public void setEmail(String email) {
		Email = email;
	}

	public int compareTo(Object arg0) {
		// TODO Auto-generated method stub
		Tenant tmp;
		if (!(arg0 instanceof Tenant)) {
			return -1;
		} else {
			tmp = (Tenant) arg0;
			return super.getFullName().compareToIgnoreCase(tmp.getFullName());
		}
	}

	public int getRental() {
		return Rental;
	}

	public void setRental(int Rental) {
		this.Rental = Rental;
	}
}
